class TreeNode(object):
    def __init__(self, x):
        self.val = x
        self.left = None
        self.right = None


class Solution(object):
    def getTargetCopy(self, original, cloned, target):
        self.out = None

        def search(node1, node2):
            if node1:
                if node1 == target:
                    self.out = node2
                else:
                    search(node1.left, node2.left)
                    search(node1.right, node2.right)

        search(original, cloned)

        return self.out